package cn.com.bs.srmp.common;

import java.util.Arrays;
import java.util.List;

/**
 * @Author mic
 * @Date 2022-08-02 17:47
 */
public class Constants {

    // 以上开头字符串长度
    public static final int FILE_KEY_PREFIX_LENGTH = 2;
    public static final String FLAG_DOT = ".";
    public static final String FLAG_COLON = ":";
    public static final String FLAG_SLASH = "/";
    public static final String FLAG_LEFT_BRACKET = "(";
    public static final String FLAG_RIGHT_BRACKET = ")";
    public static final String FLAG_SPACE = " ";
    public static final String EXT_TXT = ".txt";
    public static final String YES = "是";
    public static final String NO = "否";
    //feign相关
    public static final String RELY_TYPE = "Feign";
    public static final String ANNOTATION_FEIGN_CLIENT = "FeignClient";
    //过滤兜底实现
    public static final String FEIGN_FALLBACK1 = "fallback";
    public static final String FEIGN_FALLBACK2 = "Fallback";
    public static final String FEIGN_FALLBACK3 = "FallBack";
    public static final String FEIGN_FALLBACK_FACTORY1 = "FallbackFactory";
    public static final String FEIGN_FALLBACK_FACTORY2 = "FallBackFactory";

    public static final String ANNOTATION_FEIGN_CLIENT_FALLBACK_FACTORY = "fallbackFactory";
    public static final String ANNOTATION_FEIGN_CLIENT_NAME = "name";

    public static final String ANNOTATION_VALUE = "value";
    //swagger
    public static final String ANNOTATION_API_OPERATION = "ApiOperation";
    //Mapping结尾
    public static final String ANNOTATION_MAPPING_END = "Mapping";
    //jar
    public static final String JAR = "jar";
    public static final String SINGLE_JAR = "single.jar";
    public static final String ZIP = "zip";
    public static final String SRC = "src";
    public static final String JAVA_SUFFIX = ".java";
    //jar过滤排除
    public static final String JAR_FILTER_SOURCES = "sources.jar";
    public static final String JAR_FILTER_ENTITY = "entity.jar";
    public static final String JAR_FILTER_POJO = "pojo";
    public static final String TARGET = "target";
    public static final String JAR_JAVACG_MERGED_JAR = "jar-javacg_merged.jar";
    public static final List<String> IGNORE_JAR_PATH = Arrays.asList("src", "classes", "generated-sources",
            "maven-archiver", ".gitignore", "pom.xml", ".flattened-pom.xml", "doc", "config", "init", "sql", "rely", ".idea", "bin", "logs");

    //excel
    public static final String EXCEL_NAME = "rely.xlsx";
    public static final String SUPPLY_SHEET_SUFFIX = "-提供";
    public static final String RELY_SHEET_SUFFIX = "-依赖";

    //html
    public static final String HTML_NAME = "rely.html";

    //扫描api java 行数
    public static final Integer SCAN_LINES = 100;


    public static final String HTML = "<!DOCTYPE>\n" +
            "<html>\n" +
            "  <head>\n" +
            "    <title>cytoscape-edgehandles.js snapping demo</title>\n" +
            "    <meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1\">\n" +
            "\n" +
            "    <script type=\"text/javascript\" src=\"./rely.js\"></script>\n" +
            "    <script src=\"https://unpkg.com/cytoscape/dist/cytoscape.min.js\"></script>\n" +
            "    <script src=\"https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.10/lodash.js\"></script>\n" +
            "    <script src=\"https://unpkg.com/popper.js@1.14.7/dist/umd/popper.js\"></script>\n" +
            "    <script src=\"https://cdn.jsdelivr.net/npm/cytoscape-popper@1.0.4/cytoscape-popper.min.js\"></script>\n" +
            "    <script src=\"https://unpkg.com/tippy.js@4.0.1/umd/index.all.min.js\"></script>\n" +
            "    <style>\n" +
            "      body {\n" +
            "        font-family: helvetica neue, helvetica, liberation sans, arial, sans-serif;\n" +
            "        font-size: 14px;\n" +
            "      }\n" +
            "      #cy {\n" +
            "        position: absolute;\n" +
            "        left: 0;\n" +
            "        top: 0;\n" +
            "        bottom: 0;\n" +
            "        right: 0;\n" +
            "        z-index: 999;\n" +
            "      }\n" +
            "      h1 {\n" +
            "        opacity: 0.5;\n" +
            "        font-size: 1em;\n" +
            "        font-weight: bold;\n" +
            "      }\n" +
            "      #buttons {\n" +
            "        position: absolute;\n" +
            "        right: 0;\n" +
            "        top: 0;\n" +
            "        z-index: 99999;\n" +
            "        margin: 1em;\n" +
            "      }\n" +
            "    </style>\n" +
            "\n" +
            "    <script>\n" +
            "      function makePopper(ele) {\n" +
            "        let ref = ele.popperRef(); // used only for positioning\n" +
            "\n" +
            "        ele.tippy = tippy(ref, { // tippy options:\n" +
            "          content: () => {\n" +
            "            return ele[0] && ele[0]._private.data.label;\n" +
            "          },\n" +
            "          trigger: 'manual', // probably want manual mode\n" +
            "          maxWidth:'100%'\n" +
            "        });\n" +
            "      }\n" +
            "      document.addEventListener('DOMContentLoaded', function(){\n" +
            "\n" +
            "        var cy = window.cy = cytoscape({\n" +
            "          container: document.getElementById('cy'),\n" +
            "\n" +
            "          layout: {\n" +
            "            name: 'concentric',\n" +
            "            concentric: function(n){ return n.id() === 'j' ? 500 : 0; },\n" +
            "            levelWidth: function(nodes){ return 400; },\n" +
            "            minNodeSpacing: 400\n" +
            "          },\n" +
            "          style: [\n" +
            "            {\n" +
            "              selector: 'node[name]',\n" +
            "              style: {\n" +
            "                'content': 'data(name)'\n" +
            "              }\n" +
            "            },\n" +
            "\n" +
            "            {\n" +
            "              selector: 'edge',\n" +
            "              style: {\n" +
            "                'curve-style': 'bezier',\n" +
            "                'target-arrow-shape':'triangle',\n" +
            "              }\n" +
            "            },\n" +
            "            // some style for the extension\n" +
            "\n" +
            "            {\n" +
            "              selector: '.eh-handle',\n" +
            "              style: {\n" +
            "                'background-color': 'red',\n" +
            "                'width': 12,\n" +
            "                'height': 12,\n" +
            "                'shape': 'ellipse',\n" +
            "                'overlay-opacity': 0,\n" +
            "                'border-width': 12, // makes the handle easier to hit\n" +
            "                'border-opacity': 0\n" +
            "              }\n" +
            "            },\n" +
            "\n" +
            "            {\n" +
            "              selector: '.eh-hover',\n" +
            "              style: {\n" +
            "                'background-color': 'red'\n" +
            "              }\n" +
            "            },\n" +
            "\n" +
            "            {\n" +
            "              selector: '.eh-source',\n" +
            "              style: {\n" +
            "                'border-width': 2,\n" +
            "                'border-color': 'red'\n" +
            "              }\n" +
            "            },\n" +
            "\n" +
            "            {\n" +
            "              selector: '.eh-target',\n" +
            "              style: {\n" +
            "                'border-width': 2,\n" +
            "                'border-color': 'red'\n" +
            "              }\n" +
            "            },\n" +
            "\n" +
            "            {\n" +
            "              selector: '.eh-preview, .eh-ghost-edge',\n" +
            "              style: {\n" +
            "                'background-color': 'red',\n" +
            "                'line-color': 'red',\n" +
            "                'target-arrow-color': 'red',\n" +
            "                'source-arrow-color': 'red'\n" +
            "              }\n" +
            "            },\n" +
            "\n" +
            "            {\n" +
            "              selector: '.eh-ghost-edge.eh-preview-active',\n" +
            "              style: {\n" +
            "                'opacity': 0\n" +
            "              }\n" +
            "            }\n" +
            "          ],\n" +
            "\n" +
            "          elements: {\n" +
            "            nodes: webkitDep.nodes,\n" +
            "            edges: webkitDep.edges,\n" +
            "          }\n" +
            "        });\n" +
            "        cy.ready(function() {\n" +
            "          console.log(cy.elements())\n" +
            "          cy.elements().filter(item => item._private.group === 'edges').forEach(function(ele) {\n" +
            "            makePopper(ele);\n" +
            "          });\n" +
            "        });\n" +
            "\n" +
            "        var eh = cy.edgehandles({\n" +
            "          snap: false\n" +
            "        });\n" +
            "\n" +
            "        document.querySelector('#draw-on').addEventListener('click', function() {\n" +
            "          eh.enableDrawMode();\n" +
            "        });\n" +
            "\n" +
            "        document.querySelector('#draw-off').addEventListener('click', function() {\n" +
            "          eh.disableDrawMode();\n" +
            "        });\n" +
            "\n" +
            "        document.querySelector('#start').addEventListener('click', function() {\n" +
            "          eh.start( cy.$('node:selected') );\n" +
            "        });\n" +
            "\n" +
            "        cy.elements().unbind('mouseover');\n" +
            "        cy.elements().filter(item => item._private.group === 'edges').bind('mouseover', (event) => event.target.tippy.show());\n" +
            "\n" +
            "        cy.elements().unbind('mouseout');\n" +
            "        cy.elements().filter(item => item._private.group === 'edges').bind('mouseout', (event) => event.target.tippy.hide());\n" +
            "\n" +
            "          cy.on('mouseover', 'edge', (evt) => {\n" +
            "            console.log(evt);\n" +
            "          })\n" +
            "      });\n" +
            "    </script>\n" +
            "  </head>\n" +
            "\n" +
            "  <body>\n" +
            "    <h1>cytoscape-edgehandles (snapping disabled)</h1>\n" +
            "\n" +
            "    <div id=\"cy\"></div>\n" +
            "\n" +
            "    <div id=\"buttons\">\n" +
            "      <button id=\"start\">Start on selected</button>\n" +
            "      <button id=\"draw-on\">Draw mode on</button>\n" +
            "      <button id=\"draw-off\">Draw mode off</button>\n" +
            "    </div>\n" +
            "\n" +
            "  </body>\n" +
            "\n" +
            "</html>\n" +
            "\n" +
            "\n" +
            "<script>\n" +
            "(function webpackUniversalModuleDefinition(root, factory) {\n" +
            "\tif(typeof exports === 'object' && typeof module === 'object')\n" +
            "\t\tmodule.exports = factory(require(\"lodash.memoize\"), require(\"lodash.throttle\"));\n" +
            "\telse if(typeof define === 'function' && define.amd)\n" +
            "\t\tdefine([\"lodash.memoize\", \"lodash.throttle\"], factory);\n" +
            "\telse if(typeof exports === 'object')\n" +
            "\t\texports[\"cytoscapeEdgehandles\"] = factory(require(\"lodash.memoize\"), require(\"lodash.throttle\"));\n" +
            "\telse\n" +
            "\t\troot[\"cytoscapeEdgehandles\"] = factory(root[\"_\"][\"memoize\"], root[\"_\"][\"throttle\"]);\n" +
            "})(this, function(__WEBPACK_EXTERNAL_MODULE_13__, __WEBPACK_EXTERNAL_MODULE_14__) {\n" +
            "return /******/ (function(modules) { // webpackBootstrap\n" +
            "/******/ \t// The module cache\n" +
            "/******/ \tvar installedModules = {};\n" +
            "/******/\n" +
            "/******/ \t// The require function\n" +
            "/******/ \tfunction __webpack_require__(moduleId) {\n" +
            "/******/\n" +
            "/******/ \t\t// Check if module is in cache\n" +
            "/******/ \t\tif(installedModules[moduleId]) {\n" +
            "/******/ \t\t\treturn installedModules[moduleId].exports;\n" +
            "/******/ \t\t}\n" +
            "/******/ \t\t// Create a new module (and put it into the cache)\n" +
            "/******/ \t\tvar module = installedModules[moduleId] = {\n" +
            "/******/ \t\t\ti: moduleId,\n" +
            "/******/ \t\t\tl: false,\n" +
            "/******/ \t\t\texports: {}\n" +
            "/******/ \t\t};\n" +
            "/******/\n" +
            "/******/ \t\t// Execute the module function\n" +
            "/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n" +
            "/******/\n" +
            "/******/ \t\t// Flag the module as loaded\n" +
            "/******/ \t\tmodule.l = true;\n" +
            "/******/\n" +
            "/******/ \t\t// Return the exports of the module\n" +
            "/******/ \t\treturn module.exports;\n" +
            "/******/ \t}\n" +
            "/******/\n" +
            "/******/\n" +
            "/******/ \t// expose the modules object (__webpack_modules__)\n" +
            "/******/ \t__webpack_require__.m = modules;\n" +
            "/******/\n" +
            "/******/ \t// expose the module cache\n" +
            "/******/ \t__webpack_require__.c = installedModules;\n" +
            "/******/\n" +
            "/******/ \t// identity function for calling harmony imports with the correct context\n" +
            "/******/ \t__webpack_require__.i = function(value) { return value; };\n" +
            "/******/\n" +
            "/******/ \t// define getter function for harmony exports\n" +
            "/******/ \t__webpack_require__.d = function(exports, name, getter) {\n" +
            "/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n" +
            "/******/ \t\t\tObject.defineProperty(exports, name, {\n" +
            "/******/ \t\t\t\tconfigurable: false,\n" +
            "/******/ \t\t\t\tenumerable: true,\n" +
            "/******/ \t\t\t\tget: getter\n" +
            "/******/ \t\t\t});\n" +
            "/******/ \t\t}\n" +
            "/******/ \t};\n" +
            "/******/\n" +
            "/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n" +
            "/******/ \t__webpack_require__.n = function(module) {\n" +
            "/******/ \t\tvar getter = module && module.__esModule ?\n" +
            "/******/ \t\t\tfunction getDefault() { return module['default']; } :\n" +
            "/******/ \t\t\tfunction getModuleExports() { return module; };\n" +
            "/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n" +
            "/******/ \t\treturn getter;\n" +
            "/******/ \t};\n" +
            "/******/\n" +
            "/******/ \t// Object.prototype.hasOwnProperty.call\n" +
            "/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n" +
            "/******/\n" +
            "/******/ \t// __webpack_public_path__\n" +
            "/******/ \t__webpack_require__.p = \"\";\n" +
            "/******/\n" +
            "/******/ \t// Load entry module and return exports\n" +
            "/******/ \treturn __webpack_require__(__webpack_require__.s = 12);\n" +
            "/******/ })\n" +
            "/************************************************************************/\n" +
            "/******/ ([\n" +
            "/* 0 */\n" +
            "/***/ (function(module, exports, __webpack_require__) {\n" +
            "\n" +
            "\"use strict\";\n" +
            "\n" +
            "\n" +
            "// Simple, internal Object.assign() polyfill for options objects etc.\n" +
            "\n" +
            "module.exports = Object.assign != null ? Object.assign.bind(Object) : function (tgt) {\n" +
            "  for (var _len = arguments.length, srcs = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n" +
            "    srcs[_key - 1] = arguments[_key];\n" +
            "  }\n" +
            "\n" +
            "  srcs.filter(function (src) {\n" +
            "    return src != null;\n" +
            "  }).forEach(function (src) {\n" +
            "    Object.keys(src).forEach(function (k) {\n" +
            "      return tgt[k] = src[k];\n" +
            "    });\n" +
            "  });\n" +
            "\n" +
            "  return tgt;\n" +
            "};\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 1 */\n" +
            "/***/ (function(module, exports, __webpack_require__) {\n" +
            "\n" +
            "\"use strict\";\n" +
            "\n" +
            "\n" +
            "var Edgehandles = __webpack_require__(10);\n" +
            "var assign = __webpack_require__(0);\n" +
            "\n" +
            "module.exports = function (options) {\n" +
            "  var cy = this;\n" +
            "\n" +
            "  return new Edgehandles(assign({ cy: cy }, options));\n" +
            "};\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 2 */\n" +
            "/***/ (function(module, exports, __webpack_require__) {\n" +
            "\n" +
            "\"use strict\";\n" +
            "\n" +
            "\n" +
            "function disableGestures() {\n" +
            "  this.saveGestureState();\n" +
            "\n" +
            "  this.cy.zoomingEnabled(false).panningEnabled(false).boxSelectionEnabled(false);\n" +
            "\n" +
            "  if (this.options.disableBrowserGestures) {\n" +
            "    var wlOpts = this.windowListenerOptions;\n" +
            "\n" +
            "    window.addEventListener('touchstart', this.preventDefault, wlOpts);\n" +
            "    window.addEventListener('touchmove', this.preventDefault, wlOpts);\n" +
            "    window.addEventListener('wheel', this.preventDefault, wlOpts);\n" +
            "  }\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function resetGestures() {\n" +
            "  this.cy.zoomingEnabled(this.lastZoomingEnabled).panningEnabled(this.lastPanningEnabled).boxSelectionEnabled(this.lastBoxSelectionEnabled);\n" +
            "\n" +
            "  if (this.options.disableBrowserGestures) {\n" +
            "    var wlOpts = this.windowListenerOptions;\n" +
            "\n" +
            "    window.removeEventListener('touchstart', this.preventDefault, wlOpts);\n" +
            "    window.removeEventListener('touchmove', this.preventDefault, wlOpts);\n" +
            "    window.removeEventListener('wheel', this.preventDefault, wlOpts);\n" +
            "  }\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function saveGestureState() {\n" +
            "  var cy = this.cy;\n" +
            "\n" +
            "\n" +
            "  this.lastPanningEnabled = cy.panningEnabled();\n" +
            "  this.lastZoomingEnabled = cy.zoomingEnabled();\n" +
            "  this.lastBoxSelectionEnabled = cy.boxSelectionEnabled();\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "module.exports = { disableGestures: disableGestures, resetGestures: resetGestures, saveGestureState: saveGestureState };\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 3 */\n" +
            "/***/ (function(module, exports, __webpack_require__) {\n" +
            "\n" +
            "\"use strict\";\n" +
            "\n" +
            "\n" +
            "function addCytoscapeListeners() {\n" +
            "  var _this = this;\n" +
            "\n" +
            "  var cy = this.cy,\n" +
            "      options = this.options;\n" +
            "\n" +
            "  // grabbing nodes\n" +
            "\n" +
            "  this.addListener(cy, 'drag', function () {\n" +
            "    return _this.grabbingNode = true;\n" +
            "  });\n" +
            "  this.addListener(cy, 'free', function () {\n" +
            "    return _this.grabbingNode = false;\n" +
            "  });\n" +
            "\n" +
            "  // start on tapstart handle\n" +
            "  // start on tapstart node (draw mode)\n" +
            "  // toggle on source node\n" +
            "  this.addListener(cy, 'tapstart', 'node', function (e) {\n" +
            "    var node = e.target;\n" +
            "\n" +
            "    if (_this.drawMode) {\n" +
            "      _this.start(node);\n" +
            "    }\n" +
            "  });\n" +
            "\n" +
            "  // update line on drag\n" +
            "  this.addListener(cy, 'tapdrag', function (e) {\n" +
            "    _this.update(e.position);\n" +
            "  });\n" +
            "\n" +
            "  // hover over preview\n" +
            "  this.addListener(cy, 'tapdragover', 'node', function (e) {\n" +
            "    if (options.snap) {\n" +
            "      // then ignore events like mouseover\n" +
            "    } else {\n" +
            "      _this.preview(e.target);\n" +
            "    }\n" +
            "  });\n" +
            "\n" +
            "  // hover out unpreview\n" +
            "  this.addListener(cy, 'tapdragout', 'node', function (e) {\n" +
            "    if (options.snap) {\n" +
            "      // then keep the preview\n" +
            "    } else {\n" +
            "      _this.unpreview(e.target);\n" +
            "    }\n" +
            "  });\n" +
            "\n" +
            "  // stop gesture on tapend\n" +
            "  this.addListener(cy, 'tapend', function () {\n" +
            "    _this.stop();\n" +
            "  });\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "module.exports = { addCytoscapeListeners: addCytoscapeListeners };\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 4 */\n" +
            "/***/ (function(module, exports, __webpack_require__) {\n" +
            "\n" +
            "\"use strict\";\n" +
            "\n" +
            "\n" +
            "/* eslint-disable no-unused-vars */\n" +
            "var defaults = {\n" +
            "  canConnect: function canConnect(sourceNode, targetNode) {\n" +
            "    // whether an edge can be created between source and target\n" +
            "    return !sourceNode.same(targetNode); // e.g. disallow loops\n" +
            "  },\n" +
            "  edgeParams: function edgeParams(sourceNode, targetNode) {\n" +
            "    // for edges between the specified source and target\n" +
            "    // return element object to be passed to cy.add() for edge\n" +
            "    return {};\n" +
            "  },\n" +
            "  hoverDelay: 150, // time spent hovering over a target node before it is considered selected\n" +
            "  snap: true, // when enabled, the edge can be drawn by just moving close to a target node (can be confusing on compound graphs)\n" +
            "  snapThreshold: 50, // the target node must be less than or equal to this many pixels away from the cursor/finger\n" +
            "  snapFrequency: 15, // the number of times per second (Hz) that snap checks done (lower is less expensive)\n" +
            "  noEdgeEventsInDraw: true, // set events:no to edges during draws, prevents mouseouts on compounds\n" +
            "  disableBrowserGestures: true // during an edge drawing gesture, disable browser gestures such as two-finger trackpad swipe and pinch-to-zoom\n" +
            "};\n" +
            "/* eslint-enable */\n" +
            "\n" +
            "module.exports = defaults;\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 5 */\n" +
            "/***/ (function(module, exports, __webpack_require__) {\n" +
            "\n" +
            "\"use strict\";\n" +
            "\n" +
            "\n" +
            "function toggleDrawMode(bool) {\n" +
            "  var cy = this.cy;\n" +
            "\n" +
            "\n" +
            "  this.drawMode = bool != null ? bool : !this.drawMode;\n" +
            "\n" +
            "  if (this.drawMode) {\n" +
            "    this.prevUngrabifyState = cy.autoungrabify();\n" +
            "\n" +
            "    cy.autoungrabify(true);\n" +
            "\n" +
            "    this.emit('drawon');\n" +
            "  } else {\n" +
            "    cy.autoungrabify(this.prevUngrabifyState);\n" +
            "\n" +
            "    this.emit('drawoff');\n" +
            "  }\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function enableDrawMode() {\n" +
            "  return this.toggleDrawMode(true);\n" +
            "}\n" +
            "\n" +
            "function disableDrawMode() {\n" +
            "  return this.toggleDrawMode(false);\n" +
            "}\n" +
            "\n" +
            "module.exports = { toggleDrawMode: toggleDrawMode, enableDrawMode: enableDrawMode, disableDrawMode: disableDrawMode };\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 6 */\n" +
            "/***/ (function(module, exports, __webpack_require__) {\n" +
            "\n" +
            "\"use strict\";\n" +
            "\n" +
            "\n" +
            "var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n" +
            "\n" +
            "var assign = __webpack_require__(0);\n" +
            "var isString = function isString(x) {\n" +
            "  return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === _typeof('');\n" +
            "};\n" +
            "var isArray = function isArray(x) {\n" +
            "  return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === _typeof([]) && x.length != null;\n" +
            "};\n" +
            "\n" +
            "function getEleJson(overrides, params, addedClasses) {\n" +
            "  var json = {};\n" +
            "\n" +
            "  // basic values\n" +
            "  assign(json, params, overrides);\n" +
            "\n" +
            "  // make sure params can specify data but that overrides take precedence\n" +
            "  assign(json.data, params.data, overrides.data);\n" +
            "\n" +
            "  if (isString(params.classes)) {\n" +
            "    json.classes = params.classes + ' ' + addedClasses;\n" +
            "  } else if (isArray(params.classes)) {\n" +
            "    json.classes = params.classes.join(' ') + ' ' + addedClasses;\n" +
            "  } else {\n" +
            "    json.classes = addedClasses;\n" +
            "  }\n" +
            "\n" +
            "  return json;\n" +
            "}\n" +
            "\n" +
            "function makeEdges() {\n" +
            "  var preview = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n" +
            "  var cy = this.cy,\n" +
            "      options = this.options,\n" +
            "      presumptiveTargets = this.presumptiveTargets,\n" +
            "      previewEles = this.previewEles,\n" +
            "      active = this.active;\n" +
            "\n" +
            "\n" +
            "  var source = this.sourceNode;\n" +
            "  var target = this.targetNode;\n" +
            "  var classes = preview ? 'eh-preview' : '';\n" +
            "  var added = cy.collection();\n" +
            "  var canConnect = this.canConnect(target);\n" +
            "\n" +
            "  // can't make edges outside of regular gesture lifecycle\n" +
            "  if (!active) {\n" +
            "    return;\n" +
            "  }\n" +
            "\n" +
            "  // must be able to connect\n" +
            "  if (!canConnect) {\n" +
            "    return;\n" +
            "  }\n" +
            "\n" +
            "  // detect cancel\n" +
            "  if (!target || target.size() === 0) {\n" +
            "    previewEles.remove();\n" +
            "\n" +
            "    this.emit('cancel', this.mp(), source, presumptiveTargets);\n" +
            "\n" +
            "    return;\n" +
            "  }\n" +
            "\n" +
            "  // just remove preview class if we already have the edges\n" +
            "  if (!preview) {\n" +
            "    previewEles.removeClass('eh-preview').style('events', '');\n" +
            "\n" +
            "    this.emit('complete', this.mp(), source, target, previewEles);\n" +
            "\n" +
            "    return;\n" +
            "  }\n" +
            "\n" +
            "  var source2target = cy.add(getEleJson({\n" +
            "    group: 'edges',\n" +
            "    data: {\n" +
            "      source: source.id(),\n" +
            "      target: target.id()\n" +
            "    }\n" +
            "  }, this.edgeParams(target), classes));\n" +
            "\n" +
            "  added = added.merge(source2target);\n" +
            "\n" +
            "  if (preview) {\n" +
            "    this.previewEles = added;\n" +
            "\n" +
            "    added.style('events', 'no');\n" +
            "  } else {\n" +
            "    added.style('events', '');\n" +
            "\n" +
            "    this.emit('complete', this.mp(), source, target, added);\n" +
            "  }\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function makePreview() {\n" +
            "  this.makeEdges(true);\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function previewShown() {\n" +
            "  return this.previewEles.nonempty() && this.previewEles.inside();\n" +
            "}\n" +
            "\n" +
            "function removePreview() {\n" +
            "  if (this.previewShown()) {\n" +
            "    this.previewEles.remove();\n" +
            "  }\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function updateEdge() {\n" +
            "  var _this = this;\n" +
            "\n" +
            "  var sourceNode = this.sourceNode,\n" +
            "      ghostNode = this.ghostNode,\n" +
            "      cy = this.cy,\n" +
            "      mx = this.mx,\n" +
            "      my = this.my;\n" +
            "\n" +
            "  var x = mx;\n" +
            "  var y = my;\n" +
            "  var ghostEdge = void 0,\n" +
            "      ghostEles = void 0;\n" +
            "\n" +
            "  // can't draw a line without having the starting node\n" +
            "  if (!sourceNode) {\n" +
            "    return;\n" +
            "  }\n" +
            "\n" +
            "  if (!ghostNode || ghostNode.length === 0 || ghostNode.removed()) {\n" +
            "    ghostEles = this.ghostEles = cy.collection();\n" +
            "\n" +
            "    cy.batch(function () {\n" +
            "      ghostNode = _this.ghostNode = cy.add({\n" +
            "        group: 'nodes',\n" +
            "        classes: 'eh-ghost eh-ghost-node',\n" +
            "        position: {\n" +
            "          x: 0,\n" +
            "          y: 0\n" +
            "        }\n" +
            "      });\n" +
            "\n" +
            "      ghostNode.style({\n" +
            "        'background-color': 'blue',\n" +
            "        'width': 0.0001,\n" +
            "        'height': 0.0001,\n" +
            "        'opacity': 0,\n" +
            "        'events': 'no'\n" +
            "      });\n" +
            "\n" +
            "      var ghostEdgeParams = {};\n" +
            "\n" +
            "      ghostEdge = cy.add(assign({}, ghostEdgeParams, {\n" +
            "        group: 'edges',\n" +
            "        data: assign({}, ghostEdgeParams.data, {\n" +
            "          source: sourceNode.id(),\n" +
            "          target: ghostNode.id()\n" +
            "        }),\n" +
            "        classes: 'eh-ghost eh-ghost-edge'\n" +
            "      }));\n" +
            "\n" +
            "      ghostEdge.style({\n" +
            "        'events': 'no'\n" +
            "      });\n" +
            "    });\n" +
            "\n" +
            "    ghostEles.merge(ghostNode).merge(ghostEdge);\n" +
            "  }\n" +
            "\n" +
            "  ghostNode.position({ x: x, y: y });\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "module.exports = {\n" +
            "  makeEdges: makeEdges, makePreview: makePreview, removePreview: removePreview, previewShown: previewShown,\n" +
            "  updateEdge: updateEdge\n" +
            "};\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 7 */\n" +
            "/***/ (function(module, exports, __webpack_require__) {\n" +
            "\n" +
            "\"use strict\";\n" +
            "\n" +
            "\n" +
            "function disableEdgeEvents() {\n" +
            "  if (this.options.noEdgeEventsInDraw) {\n" +
            "    this.cy.edges().style('events', 'no');\n" +
            "  }\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function enableEdgeEvents() {\n" +
            "  if (this.options.noEdgeEventsInDraw) {\n" +
            "    this.cy.edges().style('events', '');\n" +
            "  }\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "module.exports = { disableEdgeEvents: disableEdgeEvents, enableEdgeEvents: enableEdgeEvents };\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 8 */\n" +
            "/***/ (function(module, exports, __webpack_require__) {\n" +
            "\n" +
            "\"use strict\";\n" +
            "\n" +
            "\n" +
            "function enable() {\n" +
            "  this.enabled = true;\n" +
            "\n" +
            "  this.emit('enable');\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function disable() {\n" +
            "  this.enabled = false;\n" +
            "\n" +
            "  this.emit('disable');\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "module.exports = { enable: enable, disable: disable };\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 9 */\n" +
            "/***/ (function(module, exports, __webpack_require__) {\n" +
            "\n" +
            "\"use strict\";\n" +
            "\n" +
            "\n" +
            "var memoize = __webpack_require__(13);\n" +
            "var sqrt2 = Math.sqrt(2);\n" +
            "\n" +
            "function canStartOn(node) {\n" +
            "  var previewEles = this.previewEles,\n" +
            "      ghostEles = this.ghostEles;\n" +
            "\n" +
            "  var isPreview = function isPreview(el) {\n" +
            "    return previewEles.anySame(el);\n" +
            "  };\n" +
            "  var isGhost = function isGhost(el) {\n" +
            "    return ghostEles.anySame(el);\n" +
            "  };\n" +
            "  var isTemp = function isTemp(el) {\n" +
            "    return isPreview(el) || isGhost(el);\n" +
            "  };\n" +
            "\n" +
            "  var enabled = this.enabled,\n" +
            "      active = this.active,\n" +
            "      grabbingNode = this.grabbingNode;\n" +
            "\n" +
            "\n" +
            "  return enabled && !active && !grabbingNode && node != null && node.nonempty() && !isTemp(node);\n" +
            "}\n" +
            "\n" +
            "function canStartDrawModeOn(node) {\n" +
            "  return this.canStartOn(node) && this.drawMode;\n" +
            "}\n" +
            "\n" +
            "function canStartNonDrawModeOn(node) {\n" +
            "  return this.canStartOn(node) && !this.drawMode;\n" +
            "}\n" +
            "\n" +
            "function start(node) {\n" +
            "  var _this = this;\n" +
            "\n" +
            "  if (!this.canStartOn(node)) {\n" +
            "    return;\n" +
            "  }\n" +
            "\n" +
            "  this.active = true;\n" +
            "\n" +
            "  this.sourceNode = node;\n" +
            "  this.sourceNode.addClass('eh-source');\n" +
            "\n" +
            "  this.disableGestures();\n" +
            "  this.disableEdgeEvents();\n" +
            "\n" +
            "  var getId = function getId(n) {\n" +
            "    return n.id();\n" +
            "  };\n" +
            "\n" +
            "  this.canConnect = memoize(function (target) {\n" +
            "    return _this.options.canConnect(_this.sourceNode, target);\n" +
            "  }, getId);\n" +
            "\n" +
            "  this.edgeParams = memoize(function (target) {\n" +
            "    return _this.options.edgeParams(_this.sourceNode, target);\n" +
            "  }, getId);\n" +
            "\n" +
            "  this.emit('start', this.hp(), node);\n" +
            "}\n" +
            "\n" +
            "function update(pos) {\n" +
            "  if (!this.active) {\n" +
            "    return;\n" +
            "  }\n" +
            "\n" +
            "  var p = pos;\n" +
            "\n" +
            "  this.mx = p.x;\n" +
            "  this.my = p.y;\n" +
            "\n" +
            "  this.updateEdge();\n" +
            "  this.throttledSnap();\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function snap() {\n" +
            "  if (!this.active || !this.options.snap) {\n" +
            "    return false;\n" +
            "  }\n" +
            "\n" +
            "  var cy = this.cy;\n" +
            "  var tgt = this.targetNode;\n" +
            "  var threshold = this.options.snapThreshold;\n" +
            "  var mousePos = this.mp();\n" +
            "  var previewEles = this.previewEles,\n" +
            "      ghostNode = this.ghostNode;\n" +
            "\n" +
            "\n" +
            "  var radius = function radius(n) {\n" +
            "    return sqrt2 * Math.max(n.outerWidth(), n.outerHeight()) / 2;\n" +
            "  }; // worst-case enclosure of bb by circle\n" +
            "  var sqDist = function sqDist(x1, y1, x2, y2) {\n" +
            "    var dx = x2 - x1;var dy = y2 - y1;return dx * dx + dy * dy;\n" +
            "  };\n" +
            "  var sqDistByPt = function sqDistByPt(p1, p2) {\n" +
            "    return sqDist(p1.x, p1.y, p2.x, p2.y);\n" +
            "  };\n" +
            "  var nodeSqDist = function nodeSqDist(n) {\n" +
            "    return sqDistByPt(n.position(), mousePos);\n" +
            "  };\n" +
            "\n" +
            "  var sqThreshold = function sqThreshold(n) {\n" +
            "    var r = radius(n);var t = r + threshold;return t * t;\n" +
            "  };\n" +
            "  var isWithinThreshold = function isWithinThreshold(n) {\n" +
            "    return nodeSqDist(n) <= sqThreshold(n);\n" +
            "  };\n" +
            "\n" +
            "  var bbSqDist = function bbSqDist(n) {\n" +
            "    var p = n.position();\n" +
            "    var halfW = n.outerWidth() / 2;\n" +
            "    var halfH = n.outerHeight() / 2;\n" +
            "\n" +
            "    // node and mouse positions, line is formed from node to mouse\n" +
            "    var nx = p.x;\n" +
            "    var ny = p.y;\n" +
            "    var mx = mousePos.x;\n" +
            "    var my = mousePos.y;\n" +
            "\n" +
            "    // bounding box\n" +
            "    var x1 = nx - halfW;\n" +
            "    var x2 = nx + halfW;\n" +
            "    var y1 = ny - halfH;\n" +
            "    var y2 = ny + halfH;\n" +
            "\n" +
            "    var insideXBounds = x1 <= mx && mx <= x2;\n" +
            "    var insideYBounds = y1 <= my && my <= y2;\n" +
            "\n" +
            "    if (insideXBounds && insideYBounds) {\n" +
            "      // inside box\n" +
            "      return 0;\n" +
            "    } else if (insideXBounds) {\n" +
            "      // perpendicular distance to box, top or bottom\n" +
            "      var dy1 = my - y1;\n" +
            "      var dy2 = my - y2;\n" +
            "\n" +
            "      return Math.min(dy1 * dy1, dy2 * dy2);\n" +
            "    } else if (insideYBounds) {\n" +
            "      // perpendicular distance to box, left or right\n" +
            "      var dx1 = mx - x1;\n" +
            "      var dx2 = mx - x2;\n" +
            "\n" +
            "      return Math.min(dx1 * dx1, dx2 * dx2);\n" +
            "    } else if (mx < x1 && my < y1) {\n" +
            "      // top-left corner distance\n" +
            "      return sqDist(mx, my, x1, y1);\n" +
            "    } else if (mx > x2 && my < y1) {\n" +
            "      // top-right corner distance\n" +
            "      return sqDist(mx, my, x2, y1);\n" +
            "    } else if (mx < x1 && my > y2) {\n" +
            "      // bottom-left corner distance\n" +
            "      return sqDist(mx, my, x1, y2);\n" +
            "    } else {\n" +
            "      // bottom-right corner distance\n" +
            "      return sqDist(mx, my, x2, y2);\n" +
            "    }\n" +
            "  };\n" +
            "\n" +
            "  var cmpBbSqDist = function cmpBbSqDist(n1, n2) {\n" +
            "    return bbSqDist(n1) - bbSqDist(n2);\n" +
            "  };\n" +
            "\n" +
            "  var cmp = cmpBbSqDist;\n" +
            "\n" +
            "  var allowHoverDelay = false;\n" +
            "\n" +
            "  var mouseIsInside = function mouseIsInside(n) {\n" +
            "    var mp = mousePos;\n" +
            "    var w = n.outerWidth();\n" +
            "    var halfW = w / 2;\n" +
            "    var h = n.outerHeight();\n" +
            "    var halfH = h / 2;\n" +
            "    var p = n.position();\n" +
            "    var x1 = p.x - halfW;\n" +
            "    var x2 = p.x + halfW;\n" +
            "    var y1 = p.y - halfH;\n" +
            "    var y2 = p.y + halfH;\n" +
            "\n" +
            "    return x1 <= mp.x && mp.x <= x2 && y1 <= mp.y && mp.y <= y2;\n" +
            "  };\n" +
            "\n" +
            "  var isEhEle = function isEhEle(n) {\n" +
            "    return n.same(previewEles) || n.same(ghostNode);\n" +
            "  };\n" +
            "\n" +
            "  var nodesByDist = cy.nodes(function (n) {\n" +
            "    return !isEhEle(n) && isWithinThreshold(n);\n" +
            "  }).sort(cmp);\n" +
            "  var snapped = false;\n" +
            "\n" +
            "  if (tgt.nonempty() && !isWithinThreshold(tgt)) {\n" +
            "    this.unpreview(tgt);\n" +
            "  }\n" +
            "\n" +
            "  for (var i = 0; i < nodesByDist.length; i++) {\n" +
            "    var n = nodesByDist[i];\n" +
            "\n" +
            "    // skip a parent node when the mouse is inside it\n" +
            "    if (n.isParent() && mouseIsInside(n)) {\n" +
            "      continue;\n" +
            "    }\n" +
            "\n" +
            "    // skip a child node when the mouse is not inside the parent\n" +
            "    if (n.isChild() && !mouseIsInside(n.parent())) {\n" +
            "      continue;\n" +
            "    }\n" +
            "\n" +
            "    if (n.same(tgt) || this.preview(n, allowHoverDelay)) {\n" +
            "      snapped = true;\n" +
            "      break;\n" +
            "    }\n" +
            "  }\n" +
            "\n" +
            "  return snapped;\n" +
            "}\n" +
            "\n" +
            "function preview(target) {\n" +
            "  var _this2 = this;\n" +
            "\n" +
            "  var allowHoverDelay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n" +
            "  var options = this.options,\n" +
            "      sourceNode = this.sourceNode,\n" +
            "      ghostNode = this.ghostNode,\n" +
            "      ghostEles = this.ghostEles,\n" +
            "      presumptiveTargets = this.presumptiveTargets,\n" +
            "      previewEles = this.previewEles,\n" +
            "      active = this.active;\n" +
            "\n" +
            "  var source = sourceNode;\n" +
            "  var isGhost = target.same(ghostNode);\n" +
            "  var noEdge = !this.canConnect(target);\n" +
            "  var isExistingTgt = target.same(this.targetNode);\n" +
            "\n" +
            "  if (!active || isGhost || noEdge || isExistingTgt\n" +
            "  // || (target.isParent())\n" +
            "  ) {\n" +
            "      return false;\n" +
            "    }\n" +
            "\n" +
            "  if (this.targetNode.nonempty()) {\n" +
            "    this.unpreview(this.targetNode);\n" +
            "  }\n" +
            "\n" +
            "  clearTimeout(this.previewTimeout);\n" +
            "\n" +
            "  var applyPreview = function applyPreview() {\n" +
            "    _this2.targetNode = target;\n" +
            "\n" +
            "    presumptiveTargets.merge(target);\n" +
            "\n" +
            "    target.addClass('eh-presumptive-target');\n" +
            "    target.addClass('eh-target');\n" +
            "\n" +
            "    _this2.emit('hoverover', _this2.mp(), source, target);\n" +
            "\n" +
            "    target.addClass('eh-preview');\n" +
            "\n" +
            "    ghostEles.addClass('eh-preview-active');\n" +
            "    sourceNode.addClass('eh-preview-active');\n" +
            "    target.addClass('eh-preview-active');\n" +
            "\n" +
            "    _this2.makePreview();\n" +
            "\n" +
            "    _this2.emit('previewon', _this2.mp(), source, target, previewEles);\n" +
            "  };\n" +
            "\n" +
            "  if (allowHoverDelay && options.hoverDelay > 0) {\n" +
            "    this.previewTimeout = setTimeout(applyPreview, options.hoverDelay);\n" +
            "  } else {\n" +
            "    applyPreview();\n" +
            "  }\n" +
            "\n" +
            "  return true;\n" +
            "}\n" +
            "\n" +
            "function unpreview(target) {\n" +
            "  if (!this.active) {\n" +
            "    return;\n" +
            "  }\n" +
            "\n" +
            "  var previewTimeout = this.previewTimeout,\n" +
            "      sourceNode = this.sourceNode,\n" +
            "      previewEles = this.previewEles,\n" +
            "      ghostEles = this.ghostEles,\n" +
            "      cy = this.cy;\n" +
            "\n" +
            "  clearTimeout(previewTimeout);\n" +
            "  this.previewTimeout = null;\n" +
            "\n" +
            "  var source = sourceNode;\n" +
            "\n" +
            "  target.removeClass('eh-preview eh-target eh-presumptive-target eh-preview-active');\n" +
            "  ghostEles.removeClass('eh-preview-active');\n" +
            "  sourceNode.removeClass('eh-preview-active');\n" +
            "\n" +
            "  this.targetNode = cy.collection();\n" +
            "\n" +
            "  this.removePreview(source, target);\n" +
            "\n" +
            "  this.emit('hoverout', this.mp(), source, target);\n" +
            "  this.emit('previewoff', this.mp(), source, target, previewEles);\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function stop() {\n" +
            "  if (!this.active) {\n" +
            "    return;\n" +
            "  }\n" +
            "\n" +
            "  var sourceNode = this.sourceNode,\n" +
            "      targetNode = this.targetNode,\n" +
            "      ghostEles = this.ghostEles,\n" +
            "      presumptiveTargets = this.presumptiveTargets;\n" +
            "\n" +
            "\n" +
            "  clearTimeout(this.previewTimeout);\n" +
            "\n" +
            "  sourceNode.removeClass('eh-source eh-preview-active');\n" +
            "  targetNode.removeClass('eh-target eh-preview eh-hover eh-preview-active');\n" +
            "  presumptiveTargets.removeClass('eh-presumptive-target');\n" +
            "\n" +
            "  this.makeEdges();\n" +
            "\n" +
            "  ghostEles.remove();\n" +
            "\n" +
            "  this.clearCollections();\n" +
            "\n" +
            "  this.resetGestures();\n" +
            "  this.enableEdgeEvents();\n" +
            "\n" +
            "  this.active = false;\n" +
            "\n" +
            "  this.emit('stop', this.mp(), sourceNode);\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "module.exports = {\n" +
            "  start: start, update: update, preview: preview, unpreview: unpreview, stop: stop, snap: snap,\n" +
            "  canStartOn: canStartOn, canStartDrawModeOn: canStartDrawModeOn, canStartNonDrawModeOn: canStartNonDrawModeOn\n" +
            "};\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 10 */\n" +
            "/***/ (function(module, exports, __webpack_require__) {\n" +
            "\n" +
            "\"use strict\";\n" +
            "\n" +
            "\n" +
            "var defaults = __webpack_require__(4);\n" +
            "var assign = __webpack_require__(0);\n" +
            "var throttle = __webpack_require__(14);\n" +
            "\n" +
            "var cyGesturesToggle = __webpack_require__(2);\n" +
            "var cyListeners = __webpack_require__(3);\n" +
            "var drawMode = __webpack_require__(5);\n" +
            "var drawing = __webpack_require__(6);\n" +
            "var enabling = __webpack_require__(8);\n" +
            "var gestureLifecycle = __webpack_require__(9);\n" +
            "var listeners = __webpack_require__(11);\n" +
            "var edgeEvents = __webpack_require__(7);\n" +
            "\n" +
            "function Edgehandles(options) {\n" +
            "  var cy = options.cy;\n" +
            "\n" +
            "  this.cy = cy;\n" +
            "  this.listeners = [];\n" +
            "\n" +
            "  // edgehandles gesture state\n" +
            "  this.enabled = true;\n" +
            "  this.drawMode = false;\n" +
            "  this.active = false;\n" +
            "  this.grabbingNode = false;\n" +
            "\n" +
            "  // edgehandles elements\n" +
            "  this.clearCollections();\n" +
            "\n" +
            "  // mouse position\n" +
            "  this.mx = 0;\n" +
            "  this.my = 0;\n" +
            "\n" +
            "  this.options = assign({}, defaults, options);\n" +
            "\n" +
            "  this.saveGestureState();\n" +
            "  this.addListeners();\n" +
            "\n" +
            "  this.throttledSnap = throttle(this.snap.bind(this), 1000 / options.snapFrequency);\n" +
            "\n" +
            "  this.preventDefault = function (e) {\n" +
            "    return e.preventDefault();\n" +
            "  };\n" +
            "\n" +
            "  // disabled until start()\n" +
            "  this.canConnect = function () {\n" +
            "    return false;\n" +
            "  };\n" +
            "\n" +
            "  var supportsPassive = false;\n" +
            "  try {\n" +
            "    var opts = Object.defineProperty({}, 'passive', {\n" +
            "      get: function get() {\n" +
            "        supportsPassive = true;\n" +
            "      }\n" +
            "    });\n" +
            "\n" +
            "    window.addEventListener('test', null, opts);\n" +
            "  } catch (err) {\n" +
            "    // swallow\n" +
            "  }\n" +
            "\n" +
            "  if (supportsPassive) {\n" +
            "    this.windowListenerOptions = { capture: true, passive: false };\n" +
            "  } else {\n" +
            "    this.windowListenerOptions = true;\n" +
            "  }\n" +
            "}\n" +
            "\n" +
            "var proto = Edgehandles.prototype = {};\n" +
            "var extend = function extend(obj) {\n" +
            "  return assign(proto, obj);\n" +
            "};\n" +
            "\n" +
            "proto.destroy = function () {\n" +
            "  this.removeListeners();\n" +
            "};\n" +
            "\n" +
            "proto.setOptions = function (options) {\n" +
            "  assign(this.options, options);\n" +
            "};\n" +
            "\n" +
            "proto.mp = function () {\n" +
            "  return { x: this.mx, y: this.my };\n" +
            "};\n" +
            "\n" +
            "proto.hp = function () {\n" +
            "  return { x: this.hx, y: this.hy };\n" +
            "};\n" +
            "\n" +
            "proto.clearCollections = function () {\n" +
            "  var cy = this.cy;\n" +
            "\n" +
            "\n" +
            "  this.previewEles = cy.collection();\n" +
            "  this.ghostEles = cy.collection();\n" +
            "  this.ghostNode = cy.collection();\n" +
            "  this.sourceNode = cy.collection();\n" +
            "  this.targetNode = cy.collection();\n" +
            "  this.presumptiveTargets = cy.collection();\n" +
            "};\n" +
            "\n" +
            "[cyGesturesToggle, cyListeners, drawMode, drawing, enabling, gestureLifecycle, listeners, edgeEvents].forEach(extend);\n" +
            "\n" +
            "module.exports = Edgehandles;\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 11 */\n" +
            "/***/ (function(module, exports, __webpack_require__) {\n" +
            "\n" +
            "\"use strict\";\n" +
            "\n" +
            "\n" +
            "var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n" +
            "\n" +
            "function addListeners() {\n" +
            "  var _this = this;\n" +
            "\n" +
            "  this.addCytoscapeListeners();\n" +
            "\n" +
            "  this.addListener(this.cy, 'destroy', function () {\n" +
            "    return _this.destroy();\n" +
            "  });\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function removeListeners() {\n" +
            "  for (var i = this.listeners.length - 1; i >= 0; i--) {\n" +
            "    var l = this.listeners[i];\n" +
            "\n" +
            "    this.removeListener(l.target, l.event, l.selector, l.callback, l.options);\n" +
            "  }\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function getListener(target, event, selector, callback, options) {\n" +
            "  if ((typeof selector === 'undefined' ? 'undefined' : _typeof(selector)) !== _typeof('')) {\n" +
            "    callback = selector;\n" +
            "    options = callback;\n" +
            "    selector = null;\n" +
            "  }\n" +
            "\n" +
            "  if (options == null) {\n" +
            "    options = false;\n" +
            "  }\n" +
            "\n" +
            "  return { target: target, event: event, selector: selector, callback: callback, options: options };\n" +
            "}\n" +
            "\n" +
            "function isDom(target) {\n" +
            "  return target instanceof Element;\n" +
            "}\n" +
            "\n" +
            "function addListener(target, event, selector, callback, options) {\n" +
            "  var l = getListener(target, event, selector, callback, options);\n" +
            "\n" +
            "  this.listeners.push(l);\n" +
            "\n" +
            "  if (isDom(l.target)) {\n" +
            "    l.target.addEventListener(l.event, l.callback, l.options);\n" +
            "  } else {\n" +
            "    if (l.selector) {\n" +
            "      l.target.addListener(l.event, l.selector, l.callback, l.options);\n" +
            "    } else {\n" +
            "      l.target.addListener(l.event, l.callback, l.options);\n" +
            "    }\n" +
            "  }\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function removeListener(target, event, selector, callback, options) {\n" +
            "  var l = getListener(target, event, selector, callback, options);\n" +
            "\n" +
            "  for (var i = this.listeners.length - 1; i >= 0; i--) {\n" +
            "    var l2 = this.listeners[i];\n" +
            "\n" +
            "    if (l.target === l2.target && l.event === l2.event && (l.selector == null || l.selector === l2.selector) && (l.callback == null || l.callback === l2.callback)) {\n" +
            "      this.listeners.splice(i, 1);\n" +
            "\n" +
            "      if (isDom(l.target)) {\n" +
            "        l.target.removeEventListener(l.event, l.callback, l.options);\n" +
            "      } else {\n" +
            "        if (l.selector) {\n" +
            "          l.target.removeListener(l.event, l.selector, l.callback, l.options);\n" +
            "        } else {\n" +
            "          l.target.removeListener(l.event, l.callback, l.options);\n" +
            "        }\n" +
            "      }\n" +
            "\n" +
            "      break;\n" +
            "    }\n" +
            "  }\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "function emit(type, position) {\n" +
            "  var cy = this.cy;\n" +
            "\n" +
            "  for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n" +
            "    args[_key - 2] = arguments[_key];\n" +
            "  }\n" +
            "\n" +
            "  cy.emit({ type: 'eh' + type, position: position }, args);\n" +
            "\n" +
            "  return this;\n" +
            "}\n" +
            "\n" +
            "module.exports = { addListener: addListener, addListeners: addListeners, removeListener: removeListener, removeListeners: removeListeners, emit: emit };\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 12 */\n" +
            "/***/ (function(module, exports, __webpack_require__) {\n" +
            "\n" +
            "\"use strict\";\n" +
            "\n" +
            "\n" +
            "var impl = __webpack_require__(1);\n" +
            "\n" +
            "// registers the extension on a cytoscape lib ref\n" +
            "var register = function register(cytoscape) {\n" +
            "  if (!cytoscape) {\n" +
            "    return;\n" +
            "  } // can't register if cytoscape unspecified\n" +
            "\n" +
            "  cytoscape('core', 'edgehandles', impl); // register with cytoscape.js\n" +
            "};\n" +
            "\n" +
            "if (typeof cytoscape !== 'undefined') {\n" +
            "  // expose to global cytoscape (i.e. window.cytoscape)\n" +
            "  register(cytoscape); // eslint-disable-line no-undef\n" +
            "}\n" +
            "\n" +
            "module.exports = register;\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 13 */\n" +
            "/***/ (function(module, exports) {\n" +
            "\n" +
            "module.exports = __WEBPACK_EXTERNAL_MODULE_13__;\n" +
            "\n" +
            "/***/ }),\n" +
            "/* 14 */\n" +
            "/***/ (function(module, exports) {\n" +
            "\n" +
            "module.exports = __WEBPACK_EXTERNAL_MODULE_14__;\n" +
            "\n" +
            "/***/ })\n" +
            "/******/ ]);\n" +
            "});\n" +
            "</script>";
}
